﻿using System.Net.Sockets;
using System.Net;
using System;

namespace Npu_Platform
{
    class Network
    {
        protected IPAddress _Ipav6;

        protected int _port;

        protected IPEndPoint _Ipep;


        public Network(IPAddress Ipav6, int Port, Exception e)
        {

            this._Ipav6 = Ipav6;
            this._port = Port;
            try
            {
                this._Ipep = new IPEndPoint(this._Ipav6, this._port);
            }
            catch (System.Exception ex)
            {
                e = ex;
            }
        }

        public Network(IPAddress Ipav6, int Port)
        {

            this._Ipav6 = Ipav6;
            this._port = Port;
            this._Ipep = new IPEndPoint(this._Ipav6, this._port);
        }
        public static Boolean Ipv6Support()
        {
            return Socket.OSSupportsIPv6;
        }
    }
}